[pull] master from mozilla:master - #509
Merged
Merged
Conversation
…055455) Improve the formula for centering glyphs in text fields and use the same shift for the single-line and the comb paths.
…etBytes` The `getBytes` methods will *always* return a Uint8Array[1], and remember that even an empty TypedArray is truthy (i.e. `!!new Uint8Array(0) === true`). Hence we can remove a few pointless checks from the `DecryptStream` and `RunLengthStream` classes, which should improve code readability a tiny bit. --- [1] See [stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/stream.js#L45-L51), [chunked_stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/chunked_stream.js#L184-L193), and [decode_stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/decode_stream.js#L86-L110).
…ecompiling font-data This avoids creating "duplicate" `TextDecoder`/`TextEncoder` instances. For example, when rendering all 1310 pages of the `pdf.pdf` document (from the test-suite) this patch reduces the number of `TextDecoder`/`TextEncoder` instances from `73` *each* to just a single one each. *Note:* Compared to PR 21801 the reduction is obviously much smaller, however it still seems worthwhile to avoid unnecessary object creation.
Remove a few unnecessary checks after calling `BaseStream.prototype.getBytes`
…TextDecoder-TextEncoder Cache the `TextDecoder`/`TextEncoder` instances used when compiling/decompiling font-data
Vertically center the text in single-line and comb text fields (bug 2055455)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )